#ifndef __EBUILDS_ITEM_MODEL_H__
#define __EBUILDS_ITEM_MODEL_H__

#include <QAbstractItemModel>
#include "packetlist.h"


class EbuildsItemModel : public QAbstractListModel {
		Q_OBJECT

	public:
		EbuildsItemModel ( QObject *parent = 0 );
		~EbuildsItemModel();
		void initPackets (const QString &category = QString() );
		QVariant data ( const QModelIndex &index, int role ) const;
		Qt::ItemFlags flags ( const QModelIndex &index ) const;
		QVariant headerData ( int section, Qt::Orientation orientation,
							  int role = Qt::DisplayRole ) const;
		QModelIndex index ( int row, int column, const QModelIndex &parent = QModelIndex() ) const;
		int rowCount ( const QModelIndex &parent = QModelIndex() ) const;
		int columnCount ( const QModelIndex &parent = QModelIndex() ) const;

	private:
		PacketList *packets;
};


#endif // __EBUILDS_ITEM_MODEL_H__
